package com.springboot.cloud.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.springboot.cloud.dao.CommentMapper;
import com.springboot.cloud.entities.Comment;

@Service
public class ConmmentService {
	@Autowired
	CommentMapper cm;
	
	public List<Comment> getcomments(int article) {
		return cm.getall(article);
	}
	public List<Comment> getmycomments(int id) {
		return cm.getmycomments(id);
	}
	public boolean addcomment(Comment c) {
		return cm.addcomment(c);
	}
	public boolean caddlike(int id) {
		return cm.caddlike(id);
	}
	public boolean caddnolike(int id) {
		return cm.caddnolike(id);
	}

}
